<template>
    <div>
        <div class="wrapper">
            <swiper :options="swiperOption">
                <!-- slides -->
                <swiper-slide v-for="item of swiperList" :key="item.id">
                    <img class="swiper-img" :src="item.imgUrl">
                </swiper-slide>
                <!-- Optional controls -->
                <div class="swiper-pagination"  slot="pagination"></div>
            </swiper>
        </div>
        <div>
            test
        </div>
    </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination'
        },
        loop: true
      },
      swiperList: [{
        'id': '001',
        'imgUrl': 'http://img1.qunarzz.com/piao/fusion/1812/e0/7aed5dde53dabe02.jpg_750x200_9b7a65fd.jpg'
      }, {
        'id': '002',
        'imgUrl': 'http://img1.qunarzz.com/piao/fusion/1809/12/856f100069809e02.jpg_750x200_e3485a2b.jpg'
      }]
    }
  }
}
</script>

<style lang="scss" scoped>
    .wrapper /deep/ .swiper-pagination-bullet-active {
      background: white;
    }
    .wrapper{
        overflow: hidden;
        width: 100%;
        height: 0;
        padding-bottom: 26.6%;
        background: #eee;
        .swiper-img{
            width: 100%;
        }
        .swiper-pagination-bullet-active {
            background: white !important;
        }
    }
</style>
